{% extends "base_worklist.html" %}
{%block title%}
İş İstek - Güncelle
{%endblock%}

{%block content%}
    
    {% if form.errors %}
        <p style="color: red;">
            Bilgilerinizde hata var.. Lütfen Düzeltin ({{form.errors}}) 
        </p>
    {% endif %}
    <div align="center" style="margin-left: auto; margin-right: auto; width: 900px">
		<ul class="tabset_tabs">
				   <li class="tabset_tabs"><a href="#tab1" class="active">İş İstek Detayı</a></li>
				   <li class="tabset_tabs"><a href="#tab2">Fatura Bilgileri</a></li>

		</ul>
		<div id="tab1" class="tabset_content">
				 <div id="itsthetable" style="padding: 10px;">
			        <form action="/worklist/isistek/{{ isistek_id }}/onayla/?goster={{xgoster}}&is_sahibi={{xis_sahibi}}" method="POST">
			        {{form.id}}
			        <table>
			    
		 
				      <thead><th colspan="2">İş İstek :</th></thead>
				       <tfoot>
				      
				         <tr><td colspan="2"><input type="submit"  onclick="this.disabled=true;this.value='calisiyor';this.form.submit();" value="Kaydet"></td></tr>
					   </tfoot>	
			
				       <tbody> 
				       
					       <tr>
					       		<td  width="150">{{ form.sno.label }}</td>
					       		<td><tdr>{{ form.sno }}{% if form.sno.errors %} <small>{{form.sno.errors}}</small> {% endif %}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.atolye.label }}</td>
					       		<td><tdr>{{ form.atolye }}{% if form.atolye.errors %} <small>{{form.atolye.errors}}</small> {% endif %}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.lokasyon.label }}</td>
					       		<td><tdr>{{form.lokasyon}}{% if form.lokasyon.errors %} <small>{{form.lokasyon.errors}}</small> {% endif %}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.cihaz.label}}</td>
					       		<td><tdr>{% ifequal isset.onaylandi 1 %}<select name="cihaz" id="id_cihaz" readonly="True" onfocus="this.initialSelect = this.selectedIndex;" onchange="this.selectedIndex = this.initialSelect;" style="border:1px solid red; background-color:#DDDDDD;"><option value="{{isset.cihaz.id}}" selected="selected">{{isset.cihaz|default_if_none:"--------"}}</option></select>{%else%}{{ form.cihaz }}{% if form.cihaz.errors %} <small>{{form.cihaz.errors}}</small> {% endif %}{%endifequal%}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.turu.label }}</td>
					       		<td><tdr>{{ form.turu }}{% if form.turu.errors %} <small>{{form.turu.errors}}</small> {% endif %}</tdr></td>
					       </tr> 
					       <tr>
					       		<td>{{ form.islem_durum.label }}</td>
					       		<td><tdr>{{form.islem_durum}}{% if form.islem_durum.errors %} <small>{{form.islem_durum.errors}}</small> {% endif %}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.aciklama.label }}</td>
					       		<td><tdr>{{form.aciklama}}{% if form.aciklama.errors %} <small>{{form.aciklama.errors}}</small> {% endif %}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.planlanan_baslangic_tarihi.label }}</td>
					       		<td><tdr>{{form.planlanan_baslangic_tarihi}}<!-- &nbsp<a href="javascript:NewCssCal('id_planlanan_baslangic_tarihi','yyyymmdd','arrow',true,24,false)">
					                                                                   <img src="/media/images/cal.gif" width="16" height="16" alt="tarih.."></a>-->
					                                                                   {% if form.planlanan_baslangic_tarihi.errors %} <small>{{form.planlanan_baslangic_tarihi.errors}}</small> {% endif %}
					                                                                   </tdr></td>
					       </tr>
					       <tr>
					       		<td>{{form.emailbildirimleri.label}}</td>
					       		<td><tdr>{{form.emailbildirimleri}}{% if form.emailbildirimleri.errors %} <small>{{form.emailbildirimleri.errors}}</small> {% endif %}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.eknot.label }}</td>
					       		<td><tdr>{{ form.eknot}}{% if form.eknot.erros %}<small>{{form.eknot.errors}}</small>{%endif%}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.onaylandi.label}}</td>
					       		<td><tdr>{{ form.onaylandi}}{%if form.onaylandi.errors %}<small>{{form.onaylandi.errors}}</small>{%endif%}&nbsp;</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.onaylayan_kullanici.label }}</td>
					       		<td><tdr>{{form.onaylayan_kullanici}}{% if form.onaylayan_kullanici.errors %}<small>{{ form.onaylayan_kullanici.errors}}</small>{%endif%}</tdr></td>
					       </tr>
					       <tr>
					       		<td>{{ form.planlanan_bitis_tarihi.label }}</td>
					       		<td><tdr>{{form.planlanan_bitis_tarihi}}&nbsp{% ifnotequal isset.onaylandi 1 %}<a href="javascript:NewCssCal('id_planlanan_bitis_tarihi','yyyymmdd','arrow',true,24,false)">
					                                                                   <img src="/media/images/cal.gif" width="16" height="16" alt="tarih.."></a>{% endifnotequal %}
					                                                                   {% if form.planlanan_bitis_tarihi.errors %} <small>{{form.planlanan_bitis_tarihi.errors}}</small> {% endif %}
					            </tdr></td>
					       </tr>
				
					   </tbody>
			       </table>
			  	   
			       </form>
				</div>
		</div>
		<div id="tab2" class="tabset_content">
				<div id="itsthetable" >
		
					o_O ~~Test aşamasındadır~~ O_o
					<ul>
					<li>--yetkile</li>
					<li>--listele</li>
					<li>--linkle</li>
					</ul>
					<!-- <form action="/worklist/isistek/{{ isistek_id }}/onayla/?goster={{xgoster}}&is_sahibi={{xis_sahibi}}" method="POST">
		        
		      		 <table>
					       <thead><th colspan="2">Fatura Oluştur :</th></thead>
	     			       <tfoot>
					         <tr><td colspan="2">&nbsp;</td></tr>
						   </tfoot>	
		
					       <tbody> 
				
							  {% if flist %}
						      
						       <tr>
						       		<td  width="150">{{ fatform.aciklama.label }}</td>
						       		<td><tdr>{{ fatform.aciklama }}{% if fatform.aciklama.errors %} <small>{{fatform.aciklama.errors}}</small> {% endif %}</tdr></td>
						       </tr>
						       <tr>
						       		<td>{{ fatform.fatura_no.label }}</td>
						       		<td><tdr>{{ fatform.fatura_no }}{% if fatform.fatura_no.errors %} <small>{{fatform.fatura_no.errors}}</small> {% endif %}</tdr></td>
						       </tr>
						       <tr>
						       		<td>{{ fatform.fatura_tarih.label }}</td>
						       		<td><tdr>{{fatform.fatura_tarih}}{% if fatform.fatura_tarih.errors %} <small>{{fatform.fatura_tarih.errors}}</small> {% endif %}</tdr></td>
						       </tr>
						       <tr>
						       		<td>{{fatform.cari.label}}</td>
						       		<td>{{fatform.cari}}</td>
						       </tr>
							
							 {% endif %}
					       </tbody>
				     
					 </table>	
					 </form>		
					 -->		
				</div>
		</div>
	
	</div>
{%endblock%}
{% block script %}
<script language="javascript"> 
function toggle() {
	var ele = document.getElementById("faturadiv");
	var text = document.getElementById("displayText");
	if(ele.style.display == "block") {
    		ele.style.display = "none";
		text.innerHTML = "show";
  	}
	else {
		ele.style.display = "block";
		text.innerHTML = "hide";
	}
} 
</script>
<script type="text/javascript" src="/media/js/addclasskillclass.js"></script>
<script type="text/javascript" src="/media/js/attachevent.js"></script>
<script type="text/javascript" src="/media/js/addcss.js"></script>
<script type="text/javascript" src="/media/js/tabtastic.js"></script>
<link rel="stylesheet" type="text/css" href="/media/css/tabtastic.css" />
{% endblock %}